package com.zhuiYun.project.api.user.service;

import com.zhuiYun.project.api.user.entiy.User;
import com.zhuiYun.project.api.user.model.UserModel;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;
import com.zhuiYun.project.util.pageUtil.PageRequest;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ClassName UserService
 * @Description TODO pc端用户修改信息
 * @Author Root
 * @Date 2023/4/4 9:50
 **/
public interface UserService {
    /**
    * @Author Root
    * @Description pc端修改
    * @Date 2023/4/6 19:59
    * @Return java.lang.Integer
    * @param imageFile
    * @param userModel
    */
    Integer updateUser(MultipartFile imageFile, UserModel userModel) throws CommonException;
    /**
    * @Author Root
    * @Description  pc端查询根据id
    * @Date 2023/4/5 8:56
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param id
    */
    CommonResult getUserById(Integer id);
    CommonResult selectPassword(Integer id,String password);
    /**
    * @Author Root
    * @Description pc端新增信息
    * @Date 2023/4/6 18:30
    * @Return java.lang.Integer
    * @param imageFile
* @param userModel
    */
    Integer saveUser(MultipartFile imageFile, UserModel userModel);
    /**
    * @Author Root
    * @Description  pc端过id删除个人信息
    * @Date 2023/4/7 8:30
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param id
    */
    CommonResult deleteUser(Integer id);

    /**
    * @Author Root
    * @Description pc端分页查询
    * @Date 2023/4/12 8:33
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param userModel
    * @param pageRequest
    */
    CommonResult getUserByPage(UserModel userModel, PageRequest pageRequest);

    /**
    * @Author Root
    * @Description pc端修改密码
    * @Date 2023/4/18 14:53
    * @Return java.lang.Integer
    * @param userModel
    */
    Integer updatePassword(UserModel userModel);
    /**
    * @Author Root
    * @Description pc端邮箱发送验证码
    * @Date 2023/4/18 14:54
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param mail
    */
    CommonResult registerByMailCode(String mail);
    /**
    * @Author Root
    * @Description pc端邮箱验证码验证
    * @Date 2023/4/18 14:55
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param mail
    * @param code
    */
    CommonResult determineMailCode(String mail,String code);
    /**
    * @Author Root
    * @Description pc端检验邮箱是否存在
    * @Date 2023/4/18 14:55
    * @Return com.zhuiYun.project.api.upUser.entiy.User
    * @param mail
    */
    User checkMail(String mail);
    /**
    * @Author Root
    * @Description pc查询手机号是否存在
    * @Date 2023/4/18 14:56
    * @Return com.zhuiYun.project.api.upUser.entiy.User
    * @param phone
    */
    User checkPhone(String phone);
    /**
    * @Author Root
    * @Description pc端用户邮箱修改
    * @Date 2023/4/18 14:56
    * @Return java.lang.Integer
    * @param userModel
    */
    Integer updateMail(UserModel userModel);
    /**
    * @Author Root
    * @Description pc端查询用户名是否存在
    * @Date 2023/4/18 15:55
    * @Return com.zhuiYun.project.api.upUser.entiy.User
    * @param userName
    */
    User checkUserName(String userName);
    /**
    * @Author Root
    * @Description pc端修改用户用户名
    * @Date 2023/4/18 16:35
    * @Return java.lang.Integer
    * @param userModel
    */
    Integer updateUserName(UserModel userModel);
    /**
    * @Author Root
    * @Description pc端修改用户手机号
    * @Date 2023/4/18 18:33
    * @Return java.lang.Integer
    * @param userModel
    */
    Integer updatePhone(UserModel userModel);
    /**
    * @Author Root
    * @Description pc端修改手机号发送验证码
    * @Date 2023/4/19 10:14
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param phone
    */
    CommonResult sendPhoneCode(String phone);
    
    /**
    * @Author Root
    * @Description pc端检验手机号验证按是否正确
    * @Date 2023/4/19 10:15
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param code
    */
    CommonResult comparePhoneCode(String code);

    /**
    * @Description 获取建立会话的用户信息列表
    * @Author lzy
    * @Date 2023/4/21 10:42
    * @Return com.zhuiYun.project.common.response.CommonResult
    * @param userIds
    */
    CommonResult getUserListByUserIds(String userIds);
}
